CentOS 7 yum 安装 Docker
更新系统
sudo yum check-update
删除旧版docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
安装Docker依赖
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
添加Docker仓库
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
安装Docker
sudo yum install docker-ce docker-ce-cli containerd.io
管理Docker服务
启动Docker
sudo systemctl start docker
添加Docker服务
sudo systemctl enable docker
查看Docker服务状态
sudo systemctl status docker